<?php 
if (auth_errors() || validation_errors()){
	Template::set_message(auth_errors() . validation_errors(), 'error');
}
?>

<?php echo form_open($this->uri->uri_string()); ?>
<fieldset>
<div class="clearfix">
	<label for="email"><?php echo lang('bf_email'); ?></label>
	<div class="input">
		<input type="text" name="email" id="email"  value="<?php echo set_value('email'); ?>"  placeholder="email" />
	</div>
</div>

<?php if ( $this->settings_lib->item('auth.login_type') !== 'email' OR $this->settings_lib->item('auth.use_usernames') == 1): ?>
<div class="clearfix">
	<label for="username"><?php echo lang('bf_username'); ?></label>
	<div class="input">
		<input type="text" name="username" id="username" value="<?php echo set_value('username') ?>" placeholder="username" />
	</div>
</div>
<?php endif; ?>

<?php if ($this->settings_lib->item('auth.use_usernames') == 2) : ?>
<div class="clearfix">
	<label><?php echo lang('us_first_name'); ?></label>
	<div class="input">
		<input type="text" id="first_name" name="first_name" value="<?php echo set_value('first_name') ?>" />
	</div>
</div>

<div class="clearfix">
	<label><?php echo lang('us_last_name'); ?></label>
	<div class="input">
		<input type="text" id="first_name" name="last_name" value="<?php echo set_value('last_name') ?>"  />
	</div>
</div>
<?php endif; ?>	

<div class="clearfix">
	<label for="password"><?php echo lang('bf_password'); ?></label>
	<div class="input">
		<input type="password" name="password" id="password" value="" placeholder="password" />
		<span class="help-block"><?php echo lang('us_password_mins'); ?></span>
	</div>
</div>

<div class="clearfix">	
	<label for="pass_confirm"><?php echo lang('bf_password_confirm'); ?></label>
	<div class="input">
		<input type="password" name="pass_confirm" id="pass_confirm" value="" placeholder="<?php echo lang('bf_password_confirm'); ?>" />
	</div>
</div>

<div class="actions">
	<input type="submit" name="submit" id="submit" class="btn primary" value="<?php echo lang('us_register'); ?>"  />	
	<p>
		<?php echo lang('us_already_registered'); ?> <?php echo anchor('/login', lang('bf_action_login')); ?>
	</p>
</div>
</fieldset>
<?php echo form_close(); ?>
	
		